
#ifndef __TILED_TMXMAP_H__
#define __TILED_TMXMAP_H__

#include "2d/CCNode.h"
#include "TiledParser.h"

namespace Tiled {
    
class TmxLayer;
class TmxLayerInfo;
class TmxMapInfo;

class TmxMap : public Node
{
public:
    /** creates a TMX Tiled Map with a TMX file.*/
    static TmxMap* create(const char* tmxFile);

    /** initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources */
    static TmxMap* create(const char* tmxString, size_t size, const char* resourcePath);

    /** return the FastTMXLayer for the specific layer */
    TmxLayer* getLayer(const std::string& layerName) const;
	TmxLayerInfo* getLayerInfo(const std::string& layerName) const;
	TmxMapInfo* getInfo() const { return _tmxInfo; }

protected:
    TmxMap();
    virtual ~TmxMap();

	bool init(const char* tmxString, size_t size, const char* resourcePath);

	TmxMapInfo* _tmxInfo;
};
    
}


#endif //__TILED_TMXMAP_H__


